3f13d81eQ9Vz-h-6RDGFkNR9CRP95g tools/misc/xen_nat_enable
3f13d81e6Z6806ihYYUw8GVKNkYnuw tools/misc/xen_nat_enable.README
3fafbef1fJFKCcJLq-ffpauvpM10jQ tools/misc/xen_netwatch.c
+3fafd0abTbQjsCr5W3DDyNdqdJezrA tools/misc/xen_netwatch_redhatscript
3f1668d4F29Jsw0aC0bJEIkOBiagiQ tools/misc/xen_read_console.c
3f87ba90EUVPQLVOlFG0sW89BCwouQ tools/misc/xen_refresh_dev.c
3f72f1bdJPsV3JCnBqs9ddL9tr6D2g xen/COPYING
#include <unistd.h>
#include <time.h>
-#define DEFAULT_SCRIPT "/var/xen/netwatch"
-#define DEFAULT_LOGFILE "/etc/xen/netwatch"
+#define DEFAULT_SCRIPT "/etc/xen/netwatch"
+#define DEFAULT_LOGFILE "/var/xen/netwatch"
#define LOG(_f, _a...) \
do { \
--- /dev/null
+#!/bin/sh
+
+# Example xen_netwatch script for Red Hat systems.
+# If the network interface goes up or down then standard Red Hat
+# scripts are executed. This may be necessary to reconfigure default
+# routes, for example.
+#
+# This script should be placed at /etc/xen/netwatch
+# You should make sure that the directory /var/xen/ exists.
+#
+# Something like the follwoing should be placed in a startup script
+# such as /etc/rc.d/rc.local:
+#
+# if [ -x /usr/bin/xen_netwatch ]; then
+# if [ -a /etc/xen/netwatch ]; then
+# mkdir -p /var/xen
+# /usr/bin/xen_netwatch
+# fi
+# fi
+
+cd /etc/sysconfig/network-scripts || exit 1
+
+if [ "x$2" == "xup" ]; then
+ if [ -x ./ifup ]; then
+ ./ifup $1
+ fi
+fi
+
+if [ "x$2" == "xdown" ] ; then
+ if [ -x ./ifdown ]; then
+ ./ifdown $1
+ fi
+fi